#include "Light.h"

void Light_init() {
    P3_MODE_OUT_PP(GPIO_Pin_4);
    P0_MODE_OUT_PP(GPIO_Pin_5);

    Light_off(ALL);
}

void Light_on(Light light) {
    if(light == ALL) {
        LED_LEFT = 1;
        LED_RIGHT = 1;
    } else if(light == LEFT) {
        LED_LEFT = 1;
    } else if (light == RIGHT) {
        LED_RIGHT = 1;
    }
}

void Light_off(Light light) {
    if(light == ALL) {
        LED_LEFT = 0;
        LED_RIGHT = 0;
    } else if(light == LEFT) {
        LED_LEFT = 0;
    } else if (light == RIGHT) {
        LED_RIGHT = 0;
    }
}